3.3.59 \(\int \frac {(e+f x)^3 \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx\) [259]

Optimal. Leaf size=108 \[ \frac {(e+f x)^4}{4 a f}-\frac {6 i f^2 (e+f x) \cosh (c+d x)}{a d^3}-\frac {i (e+f x)^3 \cosh (c+d x)}{a d}+\frac {6 i f^3 \sinh (c+d x)}{a d^4}+\frac {3 i f (e+f x)^2 \sinh (c+d x)}{a d^2} \]

[Out]

1/4*(f*x+e)^4/a/f-6*I*f^2*(f*x+e)*cosh(d*x+c)/a/d^3-I*(f*x+e)^3*cosh(d*x+c)/a/d+6*I*f^3*sinh(d*x+c)/a/d^4+3*I*
f*(f*x+e)^2*sinh(d*x+c)/a/d^2

________________________________________________________________________________________

Rubi [A]
time = 0.12, antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {5682, 32, 3377, 2717} \begin {gather*} \frac {6 i f^3 \sinh (c+d x)}{a d^4}-\frac {6 i f^2 (e+f x) \cosh (c+d x)}{a d^3}+\frac {3 i f (e+f x)^2 \sinh (c+d x)}{a d^2}-\frac {i (e+f x)^3 \cosh (c+d x)}{a d}+\frac {(e+f x)^4}{4 a f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((e + f*x)^3*Cosh[c + d*x]^2)/(a + I*a*Sinh[c + d*x]),x]

[Out]

(e + f*x)^4/(4*a*f) - ((6*I)*f^2*(e + f*x)*Cosh[c + d*x])/(a*d^3) - (I*(e + f*x)^3*Cosh[c + d*x])/(a*d) + ((6*
I)*f^3*Sinh[c + d*x])/(a*d^4) + ((3*I)*f*(e + f*x)^2*Sinh[c + d*x])/(a*d^2)

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 5682

Int[(Cosh[(c_.) + (d_.)*(x_)]^(n_)*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sinh[(c_.) + (d_.)*(x_)]), x_Symb
ol] :> Dist[1/a, Int[(e + f*x)^m*Cosh[c + d*x]^(n - 2), x], x] + Dist[1/b, Int[(e + f*x)^m*Cosh[c + d*x]^(n -
2)*Sinh[c + d*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 1] && EqQ[a^2 + b^2, 0]

Rubi steps

\begin {align*} \int \frac {(e+f x)^3 \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx &=-\frac {i \int (e+f x)^3 \sinh (c+d x) \, dx}{a}+\frac {\int (e+f x)^3 \, dx}{a}\\ &=\frac {(e+f x)^4}{4 a f}-\frac {i (e+f x)^3 \cosh (c+d x)}{a d}+\frac {(3 i f) \int (e+f x)^2 \cosh (c+d x) \, dx}{a d}\\ &=\frac {(e+f x)^4}{4 a f}-\frac {i (e+f x)^3 \cosh (c+d x)}{a d}+\frac {3 i f (e+f x)^2 \sinh (c+d x)}{a d^2}-\frac {\left (6 i f^2\right ) \int (e+f x) \sinh (c+d x) \, dx}{a d^2}\\ &=\frac {(e+f x)^4}{4 a f}-\frac {6 i f^2 (e+f x) \cosh (c+d x)}{a d^3}-\frac {i (e+f x)^3 \cosh (c+d x)}{a d}+\frac {3 i f (e+f x)^2 \sinh (c+d x)}{a d^2}+\frac {\left (6 i f^3\right ) \int \cosh (c+d x) \, dx}{a d^3}\\ &=\frac {(e+f x)^4}{4 a f}-\frac {6 i f^2 (e+f x) \cosh (c+d x)}{a d^3}-\frac {i (e+f x)^3 \cosh (c+d x)}{a d}+\frac {6 i f^3 \sinh (c+d x)}{a d^4}+\frac {3 i f (e+f x)^2 \sinh (c+d x)}{a d^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.36, size = 106, normalized size = 0.98 \begin {gather*} \frac {d^4 x \left (4 e^3+6 e^2 f x+4 e f^2 x^2+f^3 x^3\right )-4 i d (e+f x) \left (6 f^2+d^2 (e+f x)^2\right ) \cosh (c+d x)+12 i f \left (2 f^2+d^2 (e+f x)^2\right ) \sinh (c+d x)}{4 a d^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((e + f*x)^3*Cosh[c + d*x]^2)/(a + I*a*Sinh[c + d*x]),x]

[Out]

(d^4*x*(4*e^3 + 6*e^2*f*x + 4*e*f^2*x^2 + f^3*x^3) - (4*I)*d*(e + f*x)*(6*f^2 + d^2*(e + f*x)^2)*Cosh[c + d*x]
 + (12*I)*f*(2*f^2 + d^2*(e + f*x)^2)*Sinh[c + d*x])/(4*a*d^4)

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 447 vs. \(2 (102 ) = 204\).
time = 1.10, size = 448, normalized size = 4.15

method result size
risch \(\frac {f^{3} x^{4}}{4 a}+\frac {f^{2} e \,x^{3}}{a}+\frac {3 f \,e^{2} x^{2}}{2 a}+\frac {e^{3} x}{a}+\frac {e^{4}}{4 a f}-\frac {i \left (f^{3} x^{3} d^{3}+3 d^{3} e \,f^{2} x^{2}+3 d^{3} e^{2} f x -3 d^{2} f^{3} x^{2}+d^{3} e^{3}-6 d^{2} e \,f^{2} x -3 d^{2} e^{2} f +6 d \,f^{3} x +6 d e \,f^{2}-6 f^{3}\right ) {\mathrm e}^{d x +c}}{2 a \,d^{4}}-\frac {i \left (f^{3} x^{3} d^{3}+3 d^{3} e \,f^{2} x^{2}+3 d^{3} e^{2} f x +3 d^{2} f^{3} x^{2}+d^{3} e^{3}+6 d^{2} e \,f^{2} x +3 d^{2} e^{2} f +6 d \,f^{3} x +6 d e \,f^{2}+6 f^{3}\right ) {\mathrm e}^{-d x -c}}{2 a \,d^{4}}\) \(266\)
derivativedivides \(-\frac {3 i f^{2} c^{2} e d \cosh \left (d x +c \right )+i e^{3} d^{3} \cosh \left (d x +c \right )-6 i f^{2} c e d \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )+i f^{3} \left (\left (d x +c \right )^{3} \cosh \left (d x +c \right )-3 \left (d x +c \right )^{2} \sinh \left (d x +c \right )+6 \left (d x +c \right ) \cosh \left (d x +c \right )-6 \sinh \left (d x +c \right )\right )+3 i f \,e^{2} d^{2} \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )-3 i c \,f^{3} \left (\left (d x +c \right )^{2} \cosh \left (d x +c \right )-2 \left (d x +c \right ) \sinh \left (d x +c \right )+2 \cosh \left (d x +c \right )\right )-i c^{3} f^{3} \cosh \left (d x +c \right )-3 i f c \,e^{2} d^{2} \cosh \left (d x +c \right )+3 i f^{2} e d \left (\left (d x +c \right )^{2} \cosh \left (d x +c \right )-2 \left (d x +c \right ) \sinh \left (d x +c \right )+2 \cosh \left (d x +c \right )\right )+3 i c^{2} f^{3} \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )+c^{3} f^{3} \left (d x +c \right )-3 f^{2} c^{2} e d \left (d x +c \right )-\frac {3 c^{2} f^{3} \left (d x +c \right )^{2}}{2}+3 f c \,e^{2} d^{2} \left (d x +c \right )+3 c d e \,f^{2} \left (d x +c \right )^{2}+c \,f^{3} \left (d x +c \right )^{3}-e^{3} d^{3} \left (d x +c \right )-\frac {3 d^{2} e^{2} f \left (d x +c \right )^{2}}{2}-f^{2} e d \left (d x +c \right )^{3}-\frac {f^{3} \left (d x +c \right )^{4}}{4}}{d^{4} a}\) \(448\)
default \(-\frac {3 i f^{2} c^{2} e d \cosh \left (d x +c \right )+i e^{3} d^{3} \cosh \left (d x +c \right )-6 i f^{2} c e d \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )+i f^{3} \left (\left (d x +c \right )^{3} \cosh \left (d x +c \right )-3 \left (d x +c \right )^{2} \sinh \left (d x +c \right )+6 \left (d x +c \right ) \cosh \left (d x +c \right )-6 \sinh \left (d x +c \right )\right )+3 i f \,e^{2} d^{2} \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )-3 i c \,f^{3} \left (\left (d x +c \right )^{2} \cosh \left (d x +c \right )-2 \left (d x +c \right ) \sinh \left (d x +c \right )+2 \cosh \left (d x +c \right )\right )-i c^{3} f^{3} \cosh \left (d x +c \right )-3 i f c \,e^{2} d^{2} \cosh \left (d x +c \right )+3 i f^{2} e d \left (\left (d x +c \right )^{2} \cosh \left (d x +c \right )-2 \left (d x +c \right ) \sinh \left (d x +c \right )+2 \cosh \left (d x +c \right )\right )+3 i c^{2} f^{3} \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )+c^{3} f^{3} \left (d x +c \right )-3 f^{2} c^{2} e d \left (d x +c \right )-\frac {3 c^{2} f^{3} \left (d x +c \right )^{2}}{2}+3 f c \,e^{2} d^{2} \left (d x +c \right )+3 c d e \,f^{2} \left (d x +c \right )^{2}+c \,f^{3} \left (d x +c \right )^{3}-e^{3} d^{3} \left (d x +c \right )-\frac {3 d^{2} e^{2} f \left (d x +c \right )^{2}}{2}-f^{2} e d \left (d x +c \right )^{3}-\frac {f^{3} \left (d x +c \right )^{4}}{4}}{d^{4} a}\) \(448\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x+e)^3*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-1/d^4/a*(3*I*f^2*c^2*e*d*cosh(d*x+c)+I*e^3*d^3*cosh(d*x+c)-6*I*f^2*c*e*d*((d*x+c)*cosh(d*x+c)-sinh(d*x+c))+I*
f^3*((d*x+c)^3*cosh(d*x+c)-3*(d*x+c)^2*sinh(d*x+c)+6*(d*x+c)*cosh(d*x+c)-6*sinh(d*x+c))+3*I*f*e^2*d^2*((d*x+c)
*cosh(d*x+c)-sinh(d*x+c))-3*I*c*f^3*((d*x+c)^2*cosh(d*x+c)-2*(d*x+c)*sinh(d*x+c)+2*cosh(d*x+c))-I*c^3*f^3*cosh
(d*x+c)-3*I*f*c*e^2*d^2*cosh(d*x+c)+3*I*f^2*e*d*((d*x+c)^2*cosh(d*x+c)-2*(d*x+c)*sinh(d*x+c)+2*cosh(d*x+c))+3*
I*c^2*f^3*((d*x+c)*cosh(d*x+c)-sinh(d*x+c))+c^3*f^3*(d*x+c)-3*f^2*c^2*e*d*(d*x+c)-3/2*c^2*f^3*(d*x+c)^2+3*f*c*
e^2*d^2*(d*x+c)+3*c*d*e*f^2*(d*x+c)^2+c*f^3*(d*x+c)^3-e^3*d^3*(d*x+c)-3/2*d^2*e^2*f*(d*x+c)^2-f^2*e*d*(d*x+c)^
3-1/4*f^3*(d*x+c)^4)

________________________________________________________________________________________

Maxima [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 372 vs. \(2 (102) = 204\).
time = 0.40, size = 372, normalized size = 3.44 \begin {gather*} \frac {3}{2} \, f {\left (\frac {2 \, x e^{\left (d x + c\right )}}{a d e^{\left (d x + c\right )} - i \, a d} - \frac {i \, d^{2} x^{2} e^{c} + i \, d x e^{c} - {\left (-i \, d x e^{\left (3 \, c\right )} + i \, e^{\left (3 \, c\right )}\right )} e^{\left (2 \, d x\right )} - {\left (d^{2} x^{2} e^{\left (2 \, c\right )} - 3 \, d x e^{\left (2 \, c\right )} + e^{\left (2 \, c\right )}\right )} e^{\left (d x\right )} + {\left (d x + 1\right )} e^{\left (-d x\right )} + i \, e^{c}}{a d^{2} e^{\left (d x + 2 \, c\right )} - i \, a d^{2} e^{c}}\right )} e^{2} + \frac {1}{2} \, {\left (\frac {2 \, {\left (d x + c\right )}}{a d} - \frac {i \, e^{\left (d x + c\right )}}{a d} - \frac {i \, e^{\left (-d x - c\right )}}{a d}\right )} e^{3} + \frac {{\left (d^{4} x^{4} e^{c} + 2 \, {\left (-i \, d^{3} x^{3} e^{\left (2 \, c\right )} + 3 i \, d^{2} x^{2} e^{\left (2 \, c\right )} - 6 i \, d x e^{\left (2 \, c\right )} + 6 i \, e^{\left (2 \, c\right )}\right )} e^{\left (d x\right )} + 2 \, {\left (-i \, d^{3} x^{3} - 3 i \, d^{2} x^{2} - 6 i \, d x - 6 i\right )} e^{\left (-d x\right )}\right )} f^{3} e^{\left (-c\right )}}{4 \, a d^{4}} + \frac {{\left (2 \, d^{3} x^{3} e^{c} + 3 \, {\left (-i \, d^{2} x^{2} e^{\left (2 \, c\right )} + 2 i \, d x e^{\left (2 \, c\right )} - 2 i \, e^{\left (2 \, c\right )}\right )} e^{\left (d x\right )} + 3 \, {\left (-i \, d^{2} x^{2} - 2 i \, d x - 2 i\right )} e^{\left (-d x\right )}\right )} f^{2} e^{\left (-c + 1\right )}}{2 \, a d^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^3*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="maxima")

[Out]

3/2*f*(2*x*e^(d*x + c)/(a*d*e^(d*x + c) - I*a*d) - (I*d^2*x^2*e^c + I*d*x*e^c - (-I*d*x*e^(3*c) + I*e^(3*c))*e
^(2*d*x) - (d^2*x^2*e^(2*c) - 3*d*x*e^(2*c) + e^(2*c))*e^(d*x) + (d*x + 1)*e^(-d*x) + I*e^c)/(a*d^2*e^(d*x + 2
*c) - I*a*d^2*e^c))*e^2 + 1/2*(2*(d*x + c)/(a*d) - I*e^(d*x + c)/(a*d) - I*e^(-d*x - c)/(a*d))*e^3 + 1/4*(d^4*
x^4*e^c + 2*(-I*d^3*x^3*e^(2*c) + 3*I*d^2*x^2*e^(2*c) - 6*I*d*x*e^(2*c) + 6*I*e^(2*c))*e^(d*x) + 2*(-I*d^3*x^3
 - 3*I*d^2*x^2 - 6*I*d*x - 6*I)*e^(-d*x))*f^3*e^(-c)/(a*d^4) + 1/2*(2*d^3*x^3*e^c + 3*(-I*d^2*x^2*e^(2*c) + 2*
I*d*x*e^(2*c) - 2*I*e^(2*c))*e^(d*x) + 3*(-I*d^2*x^2 - 2*I*d*x - 2*I)*e^(-d*x))*f^2*e^(-c + 1)/(a*d^3)

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 260 vs. \(2 (102) = 204\).
time = 0.36, size = 260, normalized size = 2.41 \begin {gather*} \frac {{\left (-2 i \, d^{3} f^{3} x^{3} - 6 i \, d^{2} f^{3} x^{2} - 12 i \, d f^{3} x - 2 i \, d^{3} e^{3} - 12 i \, f^{3} - 6 \, {\left (i \, d^{3} f x + i \, d^{2} f\right )} e^{2} - 6 \, {\left (i \, d^{3} f^{2} x^{2} + 2 i \, d^{2} f^{2} x + 2 i \, d f^{2}\right )} e - 2 \, {\left (i \, d^{3} f^{3} x^{3} - 3 i \, d^{2} f^{3} x^{2} + 6 i \, d f^{3} x + i \, d^{3} e^{3} - 6 i \, f^{3} + 3 \, {\left (i \, d^{3} f x - i \, d^{2} f\right )} e^{2} + 3 \, {\left (i \, d^{3} f^{2} x^{2} - 2 i \, d^{2} f^{2} x + 2 i \, d f^{2}\right )} e\right )} e^{\left (2 \, d x + 2 \, c\right )} + {\left (d^{4} f^{3} x^{4} + 4 \, d^{4} f^{2} x^{3} e + 6 \, d^{4} f x^{2} e^{2} + 4 \, d^{4} x e^{3}\right )} e^{\left (d x + c\right )}\right )} e^{\left (-d x - c\right )}}{4 \, a d^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^3*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="fricas")

[Out]

1/4*(-2*I*d^3*f^3*x^3 - 6*I*d^2*f^3*x^2 - 12*I*d*f^3*x - 2*I*d^3*e^3 - 12*I*f^3 - 6*(I*d^3*f*x + I*d^2*f)*e^2
- 6*(I*d^3*f^2*x^2 + 2*I*d^2*f^2*x + 2*I*d*f^2)*e - 2*(I*d^3*f^3*x^3 - 3*I*d^2*f^3*x^2 + 6*I*d*f^3*x + I*d^3*e
^3 - 6*I*f^3 + 3*(I*d^3*f*x - I*d^2*f)*e^2 + 3*(I*d^3*f^2*x^2 - 2*I*d^2*f^2*x + 2*I*d*f^2)*e)*e^(2*d*x + 2*c)
+ (d^4*f^3*x^4 + 4*d^4*f^2*x^3*e + 6*d^4*f*x^2*e^2 + 4*d^4*x*e^3)*e^(d*x + c))*e^(-d*x - c)/(a*d^4)

________________________________________________________________________________________

Sympy [A]
time = 0.39, size = 518, normalized size = 4.80 \begin {gather*} \begin {cases} \frac {\left (\left (- 2 i a d^{7} e^{3} - 6 i a d^{7} e^{2} f x - 6 i a d^{7} e f^{2} x^{2} - 2 i a d^{7} f^{3} x^{3} - 6 i a d^{6} e^{2} f - 12 i a d^{6} e f^{2} x - 6 i a d^{6} f^{3} x^{2} - 12 i a d^{5} e f^{2} - 12 i a d^{5} f^{3} x - 12 i a d^{4} f^{3}\right ) e^{- d x} + \left (- 2 i a d^{7} e^{3} e^{2 c} - 6 i a d^{7} e^{2} f x e^{2 c} - 6 i a d^{7} e f^{2} x^{2} e^{2 c} - 2 i a d^{7} f^{3} x^{3} e^{2 c} + 6 i a d^{6} e^{2} f e^{2 c} + 12 i a d^{6} e f^{2} x e^{2 c} + 6 i a d^{6} f^{3} x^{2} e^{2 c} - 12 i a d^{5} e f^{2} e^{2 c} - 12 i a d^{5} f^{3} x e^{2 c} + 12 i a d^{4} f^{3} e^{2 c}\right ) e^{d x}\right ) e^{- c}}{4 a^{2} d^{8}} & \text {for}\: a^{2} d^{8} e^{c} \neq 0 \\\frac {x^{4} \left (- i f^{3} e^{2 c} + i f^{3}\right ) e^{- c}}{8 a} + \frac {x^{3} \left (- i e f^{2} e^{2 c} + i e f^{2}\right ) e^{- c}}{2 a} + \frac {x^{2} \left (- 3 i e^{2} f e^{2 c} + 3 i e^{2} f\right ) e^{- c}}{4 a} + \frac {x \left (- i e^{3} e^{2 c} + i e^{3}\right ) e^{- c}}{2 a} & \text {otherwise} \end {cases} + \frac {e^{3} x}{a} + \frac {3 e^{2} f x^{2}}{2 a} + \frac {e f^{2} x^{3}}{a} + \frac {f^{3} x^{4}}{4 a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)**3*cosh(d*x+c)**2/(a+I*a*sinh(d*x+c)),x)

[Out]

Piecewise((((-2*I*a*d**7*e**3 - 6*I*a*d**7*e**2*f*x - 6*I*a*d**7*e*f**2*x**2 - 2*I*a*d**7*f**3*x**3 - 6*I*a*d*
*6*e**2*f - 12*I*a*d**6*e*f**2*x - 6*I*a*d**6*f**3*x**2 - 12*I*a*d**5*e*f**2 - 12*I*a*d**5*f**3*x - 12*I*a*d**
4*f**3)*exp(-d*x) + (-2*I*a*d**7*e**3*exp(2*c) - 6*I*a*d**7*e**2*f*x*exp(2*c) - 6*I*a*d**7*e*f**2*x**2*exp(2*c
) - 2*I*a*d**7*f**3*x**3*exp(2*c) + 6*I*a*d**6*e**2*f*exp(2*c) + 12*I*a*d**6*e*f**2*x*exp(2*c) + 6*I*a*d**6*f*
*3*x**2*exp(2*c) - 12*I*a*d**5*e*f**2*exp(2*c) - 12*I*a*d**5*f**3*x*exp(2*c) + 12*I*a*d**4*f**3*exp(2*c))*exp(
d*x))*exp(-c)/(4*a**2*d**8), Ne(a**2*d**8*exp(c), 0)), (x**4*(-I*f**3*exp(2*c) + I*f**3)*exp(-c)/(8*a) + x**3*
(-I*e*f**2*exp(2*c) + I*e*f**2)*exp(-c)/(2*a) + x**2*(-3*I*e**2*f*exp(2*c) + 3*I*e**2*f)*exp(-c)/(4*a) + x*(-I
*e**3*exp(2*c) + I*e**3)*exp(-c)/(2*a), True)) + e**3*x/a + 3*e**2*f*x**2/(2*a) + e*f**2*x**3/a + f**3*x**4/(4
*a)

________________________________________________________________________________________

Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 355 vs. \(2 (98) = 196\).
time = 0.46, size = 355, normalized size = 3.29 \begin {gather*} \frac {{\left (d^{4} f^{3} x^{4} e^{\left (d x + c\right )} + 4 \, d^{4} e f^{2} x^{3} e^{\left (d x + c\right )} - 2 i \, d^{3} f^{3} x^{3} e^{\left (2 \, d x + 2 \, c\right )} + 6 \, d^{4} e^{2} f x^{2} e^{\left (d x + c\right )} - 2 i \, d^{3} f^{3} x^{3} - 6 i \, d^{3} e f^{2} x^{2} e^{\left (2 \, d x + 2 \, c\right )} + 4 \, d^{4} e^{3} x e^{\left (d x + c\right )} - 6 i \, d^{3} e f^{2} x^{2} - 6 i \, d^{3} e^{2} f x e^{\left (2 \, d x + 2 \, c\right )} + 6 i \, d^{2} f^{3} x^{2} e^{\left (2 \, d x + 2 \, c\right )} - 6 i \, d^{3} e^{2} f x - 6 i \, d^{2} f^{3} x^{2} - 2 i \, d^{3} e^{3} e^{\left (2 \, d x + 2 \, c\right )} + 12 i \, d^{2} e f^{2} x e^{\left (2 \, d x + 2 \, c\right )} - 2 i \, d^{3} e^{3} - 12 i \, d^{2} e f^{2} x + 6 i \, d^{2} e^{2} f e^{\left (2 \, d x + 2 \, c\right )} - 12 i \, d f^{3} x e^{\left (2 \, d x + 2 \, c\right )} - 6 i \, d^{2} e^{2} f - 12 i \, d f^{3} x - 12 i \, d e f^{2} e^{\left (2 \, d x + 2 \, c\right )} - 12 i \, d e f^{2} + 12 i \, f^{3} e^{\left (2 \, d x + 2 \, c\right )} - 12 i \, f^{3}\right )} e^{\left (-d x - c\right )}}{4 \, a d^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^3*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="giac")

[Out]

1/4*(d^4*f^3*x^4*e^(d*x + c) + 4*d^4*e*f^2*x^3*e^(d*x + c) - 2*I*d^3*f^3*x^3*e^(2*d*x + 2*c) + 6*d^4*e^2*f*x^2
*e^(d*x + c) - 2*I*d^3*f^3*x^3 - 6*I*d^3*e*f^2*x^2*e^(2*d*x + 2*c) + 4*d^4*e^3*x*e^(d*x + c) - 6*I*d^3*e*f^2*x
^2 - 6*I*d^3*e^2*f*x*e^(2*d*x + 2*c) + 6*I*d^2*f^3*x^2*e^(2*d*x + 2*c) - 6*I*d^3*e^2*f*x - 6*I*d^2*f^3*x^2 - 2
*I*d^3*e^3*e^(2*d*x + 2*c) + 12*I*d^2*e*f^2*x*e^(2*d*x + 2*c) - 2*I*d^3*e^3 - 12*I*d^2*e*f^2*x + 6*I*d^2*e^2*f
*e^(2*d*x + 2*c) - 12*I*d*f^3*x*e^(2*d*x + 2*c) - 6*I*d^2*e^2*f - 12*I*d*f^3*x - 12*I*d*e*f^2*e^(2*d*x + 2*c)
- 12*I*d*e*f^2 + 12*I*f^3*e^(2*d*x + 2*c) - 12*I*f^3)*e^(-d*x - c)/(a*d^4)

________________________________________________________________________________________

Mupad [B]
time = 0.72, size = 269, normalized size = 2.49 \begin {gather*} {\mathrm {e}}^{c+d\,x}\,\left (\frac {\left (-d^3\,e^3+3\,d^2\,e^2\,f-6\,d\,e\,f^2+6\,f^3\right )\,1{}\mathrm {i}}{2\,a\,d^4}-\frac {f^3\,x^3\,1{}\mathrm {i}}{2\,a\,d}+\frac {f^2\,x^2\,\left (f-d\,e\right )\,3{}\mathrm {i}}{2\,a\,d^2}-\frac {f\,x\,\left (d^2\,e^2-2\,d\,e\,f+2\,f^2\right )\,3{}\mathrm {i}}{2\,a\,d^3}\right )-{\mathrm {e}}^{-c-d\,x}\,\left (\frac {\left (d^3\,e^3+3\,d^2\,e^2\,f+6\,d\,e\,f^2+6\,f^3\right )\,1{}\mathrm {i}}{2\,a\,d^4}+\frac {f^3\,x^3\,1{}\mathrm {i}}{2\,a\,d}+\frac {f^2\,x^2\,\left (f+d\,e\right )\,3{}\mathrm {i}}{2\,a\,d^2}+\frac {f\,x\,\left (d^2\,e^2+2\,d\,e\,f+2\,f^2\right )\,3{}\mathrm {i}}{2\,a\,d^3}\right )+\frac {e^3\,x}{a}+\frac {f^3\,x^4}{4\,a}+\frac {3\,e^2\,f\,x^2}{2\,a}+\frac {e\,f^2\,x^3}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cosh(c + d*x)^2*(e + f*x)^3)/(a + a*sinh(c + d*x)*1i),x)

[Out]

exp(c + d*x)*(((6*f^3 - d^3*e^3 + 3*d^2*e^2*f - 6*d*e*f^2)*1i)/(2*a*d^4) - (f^3*x^3*1i)/(2*a*d) + (f^2*x^2*(f
- d*e)*3i)/(2*a*d^2) - (f*x*(2*f^2 + d^2*e^2 - 2*d*e*f)*3i)/(2*a*d^3)) - exp(- c - d*x)*(((6*f^3 + d^3*e^3 + 3
*d^2*e^2*f + 6*d*e*f^2)*1i)/(2*a*d^4) + (f^3*x^3*1i)/(2*a*d) + (f^2*x^2*(f + d*e)*3i)/(2*a*d^2) + (f*x*(2*f^2
+ d^2*e^2 + 2*d*e*f)*3i)/(2*a*d^3)) + (e^3*x)/a + (f^3*x^4)/(4*a) + (3*e^2*f*x^2)/(2*a) + (e*f^2*x^3)/a

________________________________________________________________________________________